﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for QuestionBL
/// </summary>
public class QuestionBL : QuestionProperties
{
    public QuestionBL()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public QuestionBL(string questionText, string imagePath, string categoryId, long userId)
    {
        // TODO: Complete member initialization
        this.QuestionText = questionText;
        this.ImagePath = imagePath;
        this.CategoryId = Convert.ToInt64(categoryId);
        this.UserId = userId;
    }

    public QuestionBL(long questionId, string questionText, string categoryId, long userId)
    {
        // TODO: Complete member initialization
        this.QuestionId = questionId;
        this.QuestionText = questionText;
        this.CategoryId = Convert.ToInt64(categoryId);
        this.UserId = userId;
    }

    public QuestionBL(long questionId)
    {
        // TODO: Complete member initialization
        this.QuestionId = questionId;
    }

    public bool Insert()
    {
        return QuestionDL.Insert(this);
    }

    public object GetQuestions(string categoryId)
    {
        return QuestionDL.GetQuestions(categoryId);
    }

    public object GetAnswer(long questionId)
    {
        return QuestionDL.GetAnswer(questionId);
    }

    public bool Update()
    {
        return QuestionDL.Update(this);
    }

    public bool Delete()
    {
        return QuestionDL.Delete(this);
    }
}